package com.aliyun.heiyu.powermaster.server.rotary.contants;

/**
 * @Description 空调sql
 * @Author shun.zhang
 * @Date 2019/12/17 10:08
 **/
public interface AirSqlContant {
    /**
     * 1.获取所有在工作的空调的编号及工控机信息
     */
    String GET_AIRINFORMATION = "select device_id from device_common  where status = 1 and type='air'";

    /**
     * 2.通过modbus获取温度的值
     */
    String GET_MODBUSVALUE = "select var_address from d_modbus";


    /**
     * 3.保存温度的数据
     */
    String SAVEA_IRDATA = "INSERT d_air_data(current_temp,collect_time,recommend_temp,air_id) VALUES(?,?,?,?)";

    /**
     * 4.更新空调风速 制冷设定温度 制冷敏感度
     */
    String UPDATE_FAN_SETP_SEN = "update data_air_dynamic SET evaporating_fan_rpm = ?,refrigerating_setpoint = ? ,refrigerating_sensitivity = ? where device_id = ?";

    /**
     * 4.保存每个阶段的
     */
    String SAVE_STEP_TIME = "INSERT INTO d_record_usetime(request_name,record_time,step1,step2,step3,step4) VALUES(?,NOW(),?,?,?,?)";

    /**
     * 获取空调机柜型号
     */
    String AIR_TYPES = "SELECT DISTINCT device_model FROM device_common WHERE TYPE = 'air' AND STATUS = 1;";
}
